import Vue from "vue";

import axios from "axios";
import $ from "jquery";
import BootStrap from "bootstrap/dist/js/bootstrap.min.js";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import dataV from '@jiaminghi/data-view'
import {
  post,
  postG,
  get,
  patch,
  put,
  deleteF,
  getBaseUrl,
  setItemUrl,
  setBaseUrl,
  scanIdCard,
  scanPrint,
  setToken,
  getToken,
  scanTemperature,
  scanOpen,
  getBaseIP,
  scanOpenJC,
} from "./http";
import VueAxios from "vue-axios";
import VueJsonp from "vue-jsonp";
import layer from "vue-layer";
import echarts from "echarts";
//xml格式 页面代码高亮文件引入
import hljs from "highlight.js";
//样式文件，我选了a11y-light.css，可选择文件里其他高亮样式css
import "highlight.js/styles/a11y-light.css";
import * as filters from "@/utils/filters";
Object.keys(filters).forEach((k) => Vue.filter(k, filters[k]));
// import signalr2 from 'signalR'
// Vue.use(signalr)
Vue.directive("highlight", function(el) {
  let blocks = el.querySelectorAll("pre code");
  blocks.forEach((block) => {
    hljs.highlightBlock(block);
  });
});
Vue.prototype.$layer = layer(Vue);
Vue.use(VueJsonp);
Vue.prototype.$http = axios;
Vue.prototype.$echarts = echarts;
Vue.use(VueAxios, axios);
//cnpm install --save vue-axios vue-jsonp vue-layer
Vue.config.productionTip = false;
Vue.prototype.$ajax = axios;
//Vue.use(jQuery)
Vue.use($);
Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(BootStrap);
Vue.use(dataV)
//定义全局变量
Vue.prototype.$post = post;
Vue.prototype.$postG = postG;
Vue.prototype.$get = get;
Vue.prototype.$patch = patch;
Vue.prototype.$put = put;
Vue.prototype.$deleteF = deleteF;
Vue.prototype.$getBaseUrl = getBaseUrl;
Vue.prototype.$setBaseUrl = setBaseUrl;
Vue.prototype.$scanIdCard = scanIdCard;
Vue.prototype.$scanPrint = scanPrint;
Vue.prototype.$setToken = setToken;
Vue.prototype.$getToken = getToken;
Vue.prototype.$scanTemperature = scanTemperature;
Vue.prototype.$scanOpen = scanOpen;
Vue.prototype.$getBaseIP = getBaseIP;
Vue.prototype.$scanOpenJC = scanOpenJC;
Vue.prototype.$setItemUrl = setItemUrl;

//App框架
import "bootstrap/dist/css/bootstrap.css";
import "./assets/app/css/bootstrap.min.css";
import "./assets/app/css/font-awesome.min.css";
import "./assets/app/css/pubilc.css";
import "./assets/app/css/pubilcYku.css";

import App from "./App.vue";
import VueRouter from "vue-router";
import router from "./router";
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
